<template>
	<view>
		<view class="p-2  bg-white rounded-lg mt-2" v-for="(item,index) in resdata" :key="index" @click="toShow(item)">
			<view class="flex align-stretch">
				<image  src="/static/photo.jpg" class="border rounded flex-shrink border-light mr-2" style="width: 200rpx;height: 120rpx;" mode=""></image>
				<view class="text-ellipsis-2 font30 line2 flex-1" style="word-wrap: break-word; word-break: break-all;">新闻标题</view>
			</view>
			<view class="flex align-center justify-between mt-1">
				<view class="flex align-center">
					<uni-icons type="contact" size="16" color="#cccccc"></uni-icons>
					<text class="font24 text-muted">小王</text>
				</view>
				<view class="flex align-center">
					<uni-icons type="eye" size="16" color="#cccccc"></uni-icons>
					<text class="font24 text-muted">111</text>
				</view>
				<view class="flex align-center">
					<uni-icons type="calendar" size="16" color="#cccccc"></uni-icons>
					<text class="font24 text-muted">222</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name:"iList",
		props:{
			resdata: {
			  type: Array,
			  default() {
			    return [];
			  },
			},
		},
		methods:{
			toShow(item){
				uni.navigateTo({
					url:'/pages/news/detail'
				})
			}
		}
	}
</script>

<style scoped>
</style>